home *** CD-ROM | disk | FTP | other *** search
/ Aminet 3 / Aminet 3 - July 1994.iso / Aminet / util / misc / aterminfo.lha / doc / terminfo.doc < prev    next >
Encoding:
Text File  |  1993-12-07  |  49.3 KB  |  1,002 lines

  1.  
  2.  
  3.  
  4. TERMINFO(5)                       TERMINFO(5)
  5.  
  6.  
  7. NAME
  8.        terminfo - terminal capability data base
  9.  
  10. SYNOPSIS
  11.        /usr/lib/terminfo
  12.  
  13. DESCRIPTION
  14.        Terminfo is a data base describing terminals.  It is used,
  15.        for  example,  by  vi(1)    and  curses(3).   Terminals  are
  16.        described  in  terminfo    by  giving  a set of capabilities
  17.        which they have and by describing how operations are  per-
  18.        formed.    Padding requirements and initialization sequences
  19.        are included in terminfo.
  20.  
  21.        Entries in terminfo consist of a number of comma-separated
  22.        fields.    White    space  after  each comma is ignored.  The
  23.        first entry for each terminal gives the    names  which  are
  24.        known  for the terminal, separated by `|' characters.  The
  25.        first name given is the most common abbreviation    for  the
  26.        terminal,  the last name given should be a long name fully
  27.        identifying the terminal, and all others are understood as
  28.        synonyms    for  the  terminal name.  All names but the last
  29.        should be in lower case and contain no  blanks;    the  last
  30.        name  may well contain upper case and blanks for readabil-
  31.        ity.
  32.  
  33.        Terminal names (except for the last, verbose entry) should
  34.        be chosen using the following conventions.  The particular
  35.        piece of hardware making up the    terminal  should  have    a
  36.        root  name  chosen, thus ``hp2621''.  This name should not
  37.        contain hyphens, except that synonyms may be  chosen  that
  38.        do not conflict with other names.  Modes that the hardware
  39.        can be in, or user preferences,    should    be  indicated  by
  40.        appending  a hyphen and an indicator of the mode.  Thus, a
  41.        vt100 in 132 column mode would be vt100-w.  The    following
  42.        suffixes should be used where possible:
  43.  
  44.        Suffix    Meaning                 Example
  45.        -w    Wide mode (more than 80 columns)    vt100-w
  46.        -am    With auto. margins (usually default)    vt100-am
  47.        -nam    Without automatic margins        vt100-nam
  48.        -n    Number of lines on the screen        aaa-60
  49.        -na    No arrow keys (leave them in local)    c100-na
  50.        -np    Number of pages of memory        c100-4p
  51.        -rv    Reverse video                c100-rv
  52.  
  53. CAPABILITIES
  54.        The  variable  is the name by which the programmer (at the
  55.        terminfo level) accesses the capability.    The  capname  is
  56.        the  short  name    used in the text of the database, and is
  57.        used by a person updating the database.
  58.  
  59.        Capability names have no hard length limit, but an  infor-
  60.        mal  limit  of  5 characters has been adopted to keep them
  61.        short.  Whenever possible, names are chosen to be the same
  62.        as  or similar to the ANSI X3.64-1979 standard.    Semantics
  63.        are also intended to match those of the specification.
  64.  
  65.        (P)    indicates padding may be specified
  66.        (G)    indicates that the string is passed through tparm with
  67.          parms as given (#i).
  68.        (*)    indicates that padding may be based on the number of
  69.          lines affected
  70.        (#i)    indicates the ith parameter.
  71.  
  72.        Variable        Capname    Description
  73.        Booleans:
  74.        auto_left_margin,       bw    cub1 wraps from column 0 to last column
  75.        auto_right_margin,      am    Terminal has automatic margins
  76.        beehive_glitch,     xsb    Beehive (f1=escape, f2=ctrl C)
  77.        ceol_standout_glitch,   xhp    Standout not erased by overwriting (hp)
  78.        eat_newline_glitch,     xenl    newline ignored after 80 cols (Concept)
  79.        erase_overstrike,       eo    Can erase overstrikes with a blank
  80.        generic_type,       gn    Generic line type (e.g. dialup, switch).
  81.        hard_copy,          hc    Hardcopy terminal
  82.        has_meta_key,       km    Has a meta key (shift, sets parity bit)
  83.        has_status_line,    hs    Has extra ``status line''
  84.        insert_null_glitch,     in    Insert mode distinguishes nulls
  85.        memory_above,       da    Display may be retained above the screen
  86.        memory_below,       db    Display may be retained below the screen
  87.        move_insert_mode,       mir    Safe to move while in insert mode
  88.        move_standout_mode,     msgr    Safe to move in standout modes
  89.        over_strike,        os    Terminal overstrikes
  90.        status_line_esc_ok,     eslok    Escape can be used on the status line
  91.        teleray_glitch,     xt    Tabs destructive, magic so char (Teleray 1061)
  92.        tilde_glitch,       hz    Hazeltine; can't print ~'s
  93.        transparent_underline,  ul    underline character overstrikes
  94.        xon_xoff,           xon    Terminal uses xon/xoff handshaking
  95.  
  96.        Numbers:
  97.        columns,        cols    Number of columns in a line
  98.        init_tabs,          it    Tabs initially every # spaces
  99.        lines,          lines    Number of lines on screen or page
  100.        lines_of_memory,    lm    Lines of memory if > lines.  0 means varies
  101.        magic_cookie_glitch,    xmc    Number of blank chars left by smso or rmso
  102.        padding_baud_rate,      pb    Lowest baud rate where cr/nl padding is needed
  103.        virtual_terminal,       vt    Virtual terminal number (CB/Unix)
  104.        width_status_line,      wsl    No. columns in status line
  105.  
  106.        Strings:
  107.        back_tab,           cbt    Back tab (P)
  108.        bell,           bel    Audible signal (bell) (P)
  109.        carriage_return,    cr    Carriage return (P*)
  110.        change_scroll_region,   csr    change to lines #1 through #2 (vt100) (PG)
  111.        clear_all_tabs,     tbc    Clear all tab stops. (P)
  112.        clear_screen,       clear    Clear screen (P*)
  113.        clr_eol,        el    Clear to end of line (P)
  114.        clr_eos,        ed    Clear to end of display (P*)
  115.  
  116.  
  117.  
  118.                  8/16/82                2
  119.  
  120.  
  121.  
  122.  
  123.  
  124. TERMINFO(5)                       TERMINFO(5)
  125.  
  126.  
  127.        column_address,     hpa    Set cursor column (PG)
  128.        command_character,      CC    Term. settable cmd char in prototype
  129.        cursor_address,     cup    Screen relative cursor motion to row #1 col #2 (PG)
  130.        cursor_down,        cud1    Down one line
  131.        cursor_home,        home    Home cursor (if no cup)
  132.        cursor_invisible,       civis    Make cursor invisible
  133.        cursor_left,        cub1    Move cursor left one space.
  134.        cursor_mem_address,     mrcup    Memory relative cursor addressing
  135.        cursor_normal,      cnorm    Make cursor appear normal (undo vs/vi)
  136.        cursor_right,       cuf1    Non-destructive space (cursor right)
  137.        cursor_to_ll,       ll    Last line, first column (if no cup)
  138.        cursor_up,          cuu1    Upline (cursor up)
  139.        cursor_visible,     cvvis    Make cursor very visible
  140.        delete_character,       dch1    Delete character (P*)
  141.        delete_line,        dl1    Delete line (P*)
  142.        dis_status_line,    dsl    Disable status line
  143.        down_half_line,     hd    Half-line down (forward 1/2 linefeed)
  144.        enter_alt_charset_mode, smacs    Start alternate character set (P)
  145.        enter_blink_mode,       blink    Turn on blinking
  146.        enter_bold_mode,    bold    Turn on bold (extra bright) mode
  147.        enter_ca_mode,      smcup    String to begin programs that use cup
  148.        enter_delete_mode,      smdc    Delete mode (enter)
  149.        enter_dim_mode,     dim    Turn on half-bright mode
  150.        enter_insert_mode,      smir    Insert mode (enter);
  151.        enter_protected_mode,   prot    Turn on protected mode
  152.        enter_reverse_mode,     rev    Turn on reverse video mode
  153.        enter_secure_mode,      invis    Turn on blank mode (chars invisible)
  154.        enter_standout_mode,    smso    Begin stand out mode
  155.        enter_underline_mode,   smul    Start underscore mode
  156.        erase_chars         ech    Erase #1 characters (PG)
  157.        exit_alt_charset_mode,  rmacs    End alternate character set (P)
  158.        exit_attribute_mode,    sgr0    Turn off all attributes
  159.        exit_ca_mode,       rmcup    String to end programs that use cup
  160.        exit_delete_mode,       rmdc    End delete mode
  161.        exit_insert_mode,       rmir    End insert mode
  162.        exit_standout_mode,     rmso    End stand out mode
  163.        exit_underline_mode,    rmul    End underscore mode
  164.        flash_screen,       flash    Visible bell (may not move cursor)
  165.        form_feed,          ff    Hardcopy terminal page eject (P*)
  166.        from_status_line,       fsl    Return from status line
  167.        init_1string,       is1    Terminal initialization string
  168.        init_2string,       is2    Terminal initialization string
  169.        init_3string,       is3    Terminal initialization string
  170.        init_file,          if    Name of file containing is
  171.        insert_character,       ich1    Insert character (P)
  172.        insert_line,        il1    Add new blank line (P*)
  173.        insert_padding,     ip    Insert pad after character inserted (P*)
  174.        key_backspace,      kbs    Sent by backspace key
  175.        key_catab,          ktbc    Sent by clear-all-tabs key.
  176.        key_clear,          kclr    Sent by clear screen or erase key.
  177.        key_ctab,           kctab    Sent by clear-tab key
  178.        key_dc,         kdch1    Sent by delete character key.
  179.        key_dl,         kdl1    Sent by delete line key.
  180.        key_down,           kcud1    Sent by terminal down arrow key
  181.  
  182.  
  183.  
  184.                  8/16/82                3
  185.  
  186.  
  187.  
  188.  
  189.  
  190. TERMINFO(5)                       TERMINFO(5)
  191.  
  192.  
  193.        key_eic,        krmir    Sent by rmir or smir in insert mode.
  194.        key_eol,        kel    Sent by clear-to-end-of-line key.
  195.        key_eos,        ked    Sent by clear-to-end-of-screen key.
  196.        key_f0,         kf0    Sent by function key f0.
  197.        key_f1,         kf1    Sent by function key f1.
  198.        key_f10,        kf10    Sent by function key f10.
  199.        key_f2,         kf2    Sent by function key f2.
  200.        key_f3,         kf3    Sent by function key f3.
  201.        key_f4,         kf4    Sent by function key f4.
  202.        key_f5,         kf5    Sent by function key f5.
  203.        key_f6,         kf6    Sent by function key f6.
  204.        key_f7,         kf7    Sent by function key f7.
  205.        key_f8,         kf8    Sent by function key f8.
  206.        key_f9,         kf9    Sent by function key f9.
  207.        key_home,           khome    Sent by home key.
  208.        key_ic,         kich1    Sent by ins char/enter ins mode key.
  209.        key_il,         kil1    Sent by insert line.
  210.        key_left,           kcub1    Sent by terminal left arrow key
  211.        key_npage,          knp    Sent by next-page key
  212.        key_ppage,          kpp    Sent by previous-page key
  213.        key_right,          kcuf1    Sent by terminal right arrow key
  214.        key_sf,         kind    Sent by scroll-forward/down key
  215.        key_sr,         kri    Sent by scroll-backward/up key
  216.        key_stab,           khts    Sent by set-tab key
  217.        key_up,         kcuu1    Sent by terminal up arrow key
  218.        keypad_local,       rmkx    Out of "keypad transmit" mode
  219.        keypad_xmit,        smkx    Put terminal in "keypad transmit" mode
  220.        label_f0,           lf0    Labels on function key f0 if not f0
  221.        label_f1,           lf1    Labels on function key f1 if not f1
  222.        label_f10,          lf10    Labels on function key f10 if not f10
  223.        label_f2,           lf2    Labels on function key f2 if not f2
  224.        label_f3,           lf3    Labels on function key f3 if not f3
  225.        label_f4,           lf4    Labels on function key f4 if not f4
  226.        label_f5,           lf5    Labels on function key f5 if not f5
  227.        label_f6,           lf6    Labels on function key f6 if not f6
  228.        label_f7,           lf7    Labels on function key f7 if not f7
  229.        label_f8,           lf8    Labels on function key f8 if not f8
  230.        label_f9,           lf9    Labels on function key f9 if not f9
  231.        meta_on,        smm    Turn on "meta mode" (8th bit)
  232.        meta_off,           rmm    Turn off "meta mode"
  233.        newline,        nel    Newline (behaves like cr followed by lf)
  234.        pad_char,           pad    Pad character (rather than null)
  235.        parm_dch,           dch    Delete #1 chars (PG*)
  236.        parm_delete_line,       dl    Delete #1 lines (PG*)
  237.        parm_down_cursor,       cud    Move cursor down #1 lines. (PG*)
  238.        parm_ich,           ich    Insert #1 blank chars (PG*)
  239.        parm_index,         indn    Scroll forward #1 lines (PG)
  240.        parm_insert_line,       il    Add #1 new blank lines (PG*)
  241.        parm_left_cursor,       cub    Move cursor left #1 spaces (PG)
  242.        parm_right_cursor,      cuf    Move cursor right #1 spaces. (PG*)
  243.        parm_rindex,        rin    Scroll backward #1 lines (PG)
  244.        parm_up_cursor,     cuu    Move cursor up #1 lines. (PG*)
  245.        pkey_key,           pfkey    Prog funct key #1 to type string #2
  246.        pkey_local,         pfloc    Prog funct key #1 to execute string #2
  247.  
  248.  
  249.  
  250.                  8/16/82                4
  251.  
  252.  
  253.  
  254.  
  255.  
  256. TERMINFO(5)                       TERMINFO(5)
  257.  
  258.  
  259.        pkey_xmit,          pfx    Prog funct key #1 to xmit string #2
  260.        print_screen,       mc0    Print contents of the screen
  261.        prtr_off,           mc4    Turn off the printer
  262.        prtr_on,        mc5    Turn on the printer
  263.        repeat_char,        rep    Repeat char #1 #2 times.  (PG*)
  264.        reset_1string,      rs1    Reset terminal completely to sane modes.
  265.        reset_2string,      rs2    Reset terminal completely to sane modes.
  266.        reset_3string,      rs3    Reset terminal completely to sane modes.
  267.        reset_file,         rf    Name of file containing reset string.
  268.        restore_cursor,     rc    Restore cursor to position of last sc.
  269.        row_address,        vpa    Vertical position absolute (set row). (PG)
  270.        save_cursor,        sc    Save cursor position. (P)
  271.        scroll_forward,     ind    Scroll text up (P)
  272.        scroll_reverse,     ri    Scroll text down (P)
  273.        set_attributes,     sgr    Define the video attributes (PG9)
  274.        set_tab,        hts    Set a tab in all rows, current column.
  275.        set_window,         wind    Current window is lines #1-#2 cols #3-#4
  276.        tab,            ht    Tab to next 8 space hardware tab stop.
  277.        to_status_line,     tsl    Go to status line, column #1
  278.        underline_char,     uc    Underscore one char and move past it
  279.        up_half_line,       hu    Half-line up (reverse 1/2 linefeed)
  280.  
  281.        A Sample Entry
  282.  
  283.        The following entry, which describes the    Concept-100,  is
  284.        among  the more complex entries in the terminfo file as of
  285.        this writing.
  286.  
  287.        concept100|c100|concept|c104|c100-4p|concept 100,
  288.       is2=\EU\Ef\E7\E5\E8\El\ENH\EK\E\200\Eo&\200\Eo\47\E,
  289.       cr=^M, cud1=^J, ind=^J, bel=^G, smcup=\EU\Ev    8p\Ep\r,
  290.       rmcup=\Ev    $<6>\Ep\r\n, il1=\E^R$<3*>, am, cub1=^H,
  291.       ed=\E^C$<16*>, el=\E^U$<16>, clear=^L$<2*>,
  292.       cup=\Ea%p1%' '%+%c%p2%' '%+%c, cols#80, dch1=\E^A$<16*>,
  293.       dl1=\E^B$<3*>, rmir=\E\200, eo, smir=\E^P, in, ip=$<16*>,
  294.       lines#24, mir, cuf1=\E=, ht=\t$<8>, kbs=^h, ul, cuu1=\E;,
  295.       db, smul=\EG, rmul=\Eg, xenl, cvvis=\EW, cnorm=\Ew,
  296.       flash=\Ek$<20>\EK, pb#9600, vt#8, smul=\EG, rmul=\Eg,
  297.       smso=\EE\ED, rmso=\Ed\Ee, dim=\EE, rev=\ED, blink=\EC,
  298.       prot=\EI, invis=\EH, sgr0=\EN\200, rep=\Er%p1%c%p2%' '%+%c$<.2*>,
  299.       smkx=\EX, rmkx=\Ex, kcuu1=\E;, kcud1=\E<, kcub1=\E>,
  300.       kcuf1=\E=, khome=\E?, kf1=\E5, kf2=\E6, kf3=\E7,
  301.  
  302.        Entries may continue onto multiple lines by placing  white
  303.        space  at  the  beginning  of  each line except the first.
  304.        Comments may be included on lines  beginning  with  ``#''.
  305.        Capabilities in terminfo are of three types: Boolean capa-
  306.        bilities which indicate that the terminal has some partic-
  307.        ular  feature, numeric capabilities giving the size of the
  308.        terminal or the size  of    particular  delays,  and  string
  309.        capabilities,  which  give a sequence which can be used to
  310.        perform particular terminal operations.
  311.  
  312.        Types of Capabilities
  313.  
  314.        All capabilities have short codes.  For instance, the fact
  315.        that  the Concept has automatic margins (i.e. an automatic
  316.        return and linefeed when the end of a line is reached)  is
  317.        indicated  by the capability am.    Hence the description of
  318.        the Concept includes am.    Numeric  capabilities    are  fol-
  319.        lowed  by the character `#' and then the value.    Thus cols
  320.        which indicates the number of  columns  the  terminal  has
  321.        gives the value `80' for the Concept.
  322.  
  323.        Finally,    string valued capabilities, such as el (clear to
  324.        end of line sequence) are given by the two character code,
  325.        an  `=',    and  then  a string ending at the next following
  326.        `,'.  A delay in milliseconds may appear anywhere in  such
  327.        a   capability,    enclosed   in    $<..>    brackets,  as  in
  328.        el=\EK$<3>, and padding characters are supplied    by  tputs
  329.        to  provide this delay.    The delay can be either a number,
  330.        e.g. `20', or a number followed by an `*', i.e.    `3*'.    A
  331.        `*' indicates that the padding required is proportional to
  332.        the number of lines affected by    the  operation,    and  the
  333.        amount  given  is  the per-affected-unit padding required.
  334.        (In the case of insert character, the factor is still  the
  335.        number  of  lines affected.  This is always one unless the
  336.        terminal has xenl and the software uses it.)  When  a  `*'
  337.        is  specified,  it  is sometimes useful to give a delay of
  338.        the form `3.5' to specify a delay per unit  to  tenths  of
  339.        milliseconds.  (Only one decimal place is allowed.)
  340.  
  341.        A  number  of  escape sequences are provided in the string
  342.        valued capabilities for easy encoding of characters there.
  343.        A  \E  (or  \e)    maps to an ESCAPE character, ^x maps to a
  344.        control-x for any appropriate x, and the sequences  \n  \r
  345.        \t  \b \f \s give a newline, return, tab, backspace, form-
  346.        feed and space, respectively.  Finally, characters may  be
  347.        given  as three octal digits after a \, and the characters
  348.        ^, \ and comma may be given as \^, \\ and \,.
  349.  
  350.        For convenience when testing entries, individual capabili-
  351.        ties may be easily commented out by directly preceding the
  352.        name of the capability by a period.  Thus the entry
  353.         33|tty33|tty|model 33 teletype,
  354.          cr=^M, cud1=^J, .ind=^J, bel=^G, cols#72, hc, os,
  355.        is equivalent to the entry
  356.         33|tty33|tty|model 33 teletype,
  357.          cr=^M, cud1=^J, bel=^G, cols#72, hc, os,
  358.        the ind capability having been 'commented out'.
  359.  
  360.        Preparing Descriptions
  361.  
  362.        We now outline how to prepare descriptions  of  terminals.
  363.        The  most  effective way to prepare a terminal description
  364.        is by imitating the description of a similar  terminal  in
  365.        terminfo    and  to  build up a description gradually, using
  366.        partial descriptions with vi to check that they    are  cor-
  367.        rect.   Be  aware  that a very unusual terminal may expose
  368.        deficiencies in    the  ability  of  the  terminfo    file  to
  369.        describe    it or bugs in vi.  To easily test a new terminal
  370.        description you can set the environment variable    TERMINFO
  371.        to a pathname of a file containing the description you are
  372.        working on and the editor will look there rather    than  in
  373.        /etc/terminfo.    To  get the padding for insert line right
  374.        (if the terminal    manufacturer  did  not    document  it)    a
  375.        severe test is to edit /etc/passwd at 9600 baud, delete 16
  376.        or so lines from the middle of the screen,  then    hit  the
  377.        `u' key several times quickly.  If the terminal messes up,
  378.        more padding is usually needed.    A  similar  test  can  be
  379.        used for insert character.
  380.  
  381.        Basic capabilities
  382.  
  383.        The  number  of    columns    on each line for the terminal is
  384.        given by the cols numeric capability.  If the terminal  is
  385.        a  CRT, then the number of lines on the screen is given by
  386.        the lines capability.  If the terminal wraps around to the
  387.        beginning  of the next line when it reaches the right mar-
  388.        gin, then it should have the am capability.  If the termi-
  389.        nal  can clear its screen, then this is given by the clear
  390.        string capability.  If the  terminal  overstrikes  (rather
  391.        than  clearing a position when a character is struck over)
  392.        then it should have the os capability.  If the terminal is
  393.        a  printing terminal, with no soft copy unit, give it both
  394.        hc and os.  (os applies to storage scope    terminals,  such
  395.        as  Tektronix  4010  series,  as well as hard copy and APL
  396.        terminals.)  If there is a code to move the cursor to  the
  397.        left  edge of the current row, give this as cr.    (Normally
  398.        this will be carriage return, control M.)  If there  is    a
  399.        code  to    produce an audible signal (bell, beep, etc) give
  400.        this as bel.
  401.  
  402.        If there is a code to move the cursor one position to  the
  403.        left  (such  as backspace) that capability should be given
  404.        as cub1.    Similarly, codes to move forward, up,    and  down
  405.        should be given as cuf1, cuu1, and cud1.    These local cur-
  406.        sor motions should not alter the text they pass over,  for
  407.        example,    you would not normally use `cuf1=\s' because the
  408.        space would erase the character moved over.
  409.  
  410.        A very important point  here  is    that  the  local  cursor
  411.        motions    encoded in terminfo are undefined at the left and
  412.        top edges  of  a    CRT  terminal.    Programs  should  never
  413.        attempt    to  backspace  around the left edge, unless bw is
  414.        given, and never attempt to go up locally off the top.  In
  415.        order  to  scroll text up, a program will go to the bottom
  416.        of the screen and send the ind (index) string.
  417.  
  418.        To scroll text down, a program goes  to    the  top  of  the
  419.        screen  and  sends  the    ri  (reverse  index) string.  The
  420.        strings ind and ri are undefined when not on their respec-
  421.        tive edges of the screen.
  422.  
  423.        The  am    capability tells whether the cursor sticks at the
  424.        right edge of the screen when text  is  output,    but  this
  425.        does not necessarily apply to a cuf1 from the last column.
  426.        The only local motion which is defined from the left  edge
  427.        is  if  bw  is  given, then a cub1 from the left edge will
  428.        move to the right edge of the previous row.  If bw is  not
  429.        given,  the effect is undefined.    This is useful for draw-
  430.        ing a box around the edge of the screen, for example.   If
  431.        the  terminal has switch selectable automatic margins, the
  432.        terminfo file usually assumes that this is  on,    i.e.  am.
  433.        If  the    terminal  has  a command which moves to the first
  434.        column of the next line, that command can be given as  nel
  435.        (newline).   It    does not matter if the command clears the
  436.        remainder of the current line, so if the terminal  has  no
  437.        cr  and lf it may still be possible to craft a working nel
  438.        out of one or both of them.
  439.  
  440.        These capabilities suffice to describe hardcopy and glass-
  441.        tty terminals.  Thus the model 33 teletype is described as
  442.  
  443.         33|tty33|tty|model 33 teletype,
  444.          cr=^M, cud1=^J, ind=^J, bel=^G, cols#72, hc, os,
  445.  
  446.        while the Lear Siegler ADM-3 is described as
  447.  
  448.         adm3|3|lsi adm3,
  449.          cr=^M, cud1=^J, ind=^J, bel=^G,
  450.          am, cub1=^H, clear=^Z, lines#24, cols#80,
  451.  
  452.        Parameterized Strings
  453.  
  454.        Cursor addressing and other strings  requiring  parameters
  455.        in  the    terminal  are described by a parameterized string
  456.        capability, with printf(3s) like escapes %x  in    it.   For
  457.        example,    to  address  the  cursor,  the cup capability is
  458.        given, using two parameters: the row and column to address
  459.        to.  (Rows and columns are numbered from zero and refer to
  460.        the physical screen visible to the user, not to any unseen
  461.        memory.)    If  the  terminal  has  memory  relative cursor
  462.        addressing, that can be indicated by mrcup.
  463.  
  464.        The parameter mechanism uses a stack and special    %  codes
  465.        to  manipulate  it.  Typically a sequence will push one of
  466.        the parameters onto the stack and then print  it    in  some
  467.        format.    Often more complex operations are necessary.
  468.  
  469.        The % encodings have the following meanings:
  470.  
  471.         %%    outputs `%'
  472.         %d    print pop() as in printf
  473.         %2d    print pop() like %2d
  474.         %02d      print pop() like %02d
  475.         %3d    print pop() like %3d
  476.         %03d      print pop() like %03d
  477.  
  478.         %c    print pop() like %c
  479.         %s    print pop() like %s
  480.  
  481.         %p[1-9]   push ith parm
  482.         %P[a-z]   set variable [a-z] to pop()
  483.         %g[a-z]   get variable [a-z] and push it
  484.         %'c'      char constant c
  485.         %{nn}     integer constant nn
  486.  
  487.         %+ %- %* %/ %m
  488.               arithmetic (%m is mod): push(pop() op pop())
  489.         %& %| %^  bit operations: push(pop() op pop())
  490.         %= %> %<  logical operations: push(pop() op pop())
  491.         %! %~     unary operations push(op pop())
  492.         %i    add 1 to first two parms (for ANSI terminals)
  493.  
  494.         %? expr %t thenpart %e elsepart %;
  495.               if-then-else, %e elsepart is optional.
  496.               else-if's are possible ala Algol 68:
  497.               %? c1 %t %e c2 %t %e c3 %t %e c4 %t %e %;
  498.  
  499.        It  should  be noted that the binary operators above (e.g.
  500.        %+, %-, %m, etc.)  all work in the usual fashion, i.e.
  501.                    %gx %gy %m
  502.        yields x mod y not y mod x.
  503.  
  504.        Consider the HP2645, which, to get to row 3 and column 12,
  505.        needs  to  be  sent  \E&a12c03Y padded for 6 milliseconds.
  506.        Note that the order of the rows and  columns  is    inverted
  507.        here,  and that the row and column are printed as two dig-
  508.        its.    Thus    its    cup      capability       is
  509.        cup=\E&%p2%2dc%p1%2dY$<6>.
  510.  
  511.        The Microterm ACT-IV needs the current row and column sent
  512.        preceded by a ^T, with the row and column  simply  encoded
  513.        in  binary, cup=^T%p1%c%p2%c.  Terminals which use %c need
  514.        to be able to backspace the cursor (cub1), and to move the
  515.        cursor  up  one line on the screen (cuu1).  This is neces-
  516.        sary because it is not always safe to transmit \n, ^D  and
  517.        \r,  as    the  system  may  change  or  discard them.  (The
  518.        library routines dealing with terminfo set  tty    modes  so
  519.        that tabs are never expanded, so \t is safe to send.  This
  520.        turns out to be essential for the Ann Arbor 4080.)
  521.  
  522.        A final example is the LSI ADM-3a, which uses row and col-
  523.        umn   offset  by    a  blank  character,  thus  cup=\E=%p1%'
  524.        '%+%c%p2%' '%+%c.  After sending `\E=',    this  pushes  the
  525.        first  parameter, pushes the ASCII value for a space (32),
  526.        adds them (pushing the sum on the stack in  place  of  the
  527.        two  previous  values) and outputs that value as a charac-
  528.        ter.  Then the same is  done  for  the  second  parameter.
  529.        More complex arithmetic is possible using the stack.
  530.  
  531.        If   the    terminal  has    row  or    column    absolute  cursor
  532.        addressing, these can be given as single    parameter  capa-
  533.        bilities    hpa (horizontal position absolute) and vpa (ver-
  534.        tical position absolute).   Sometimes  these  are  shorter
  535.        than  the more general two parameter sequence (as with the
  536.        hp2645) and can be used in preference to cup .    If  there
  537.        are parameterized local motions (e.g. move n spaces to the
  538.        right) these can be given as cud, cub, cuf, and cuu with a
  539.        single  parameter  indicating  how  many    spaces    to move.
  540.        These are primarily useful if the terminal does    not  have
  541.        cup, such as the Tektronix 4025.
  542.  
  543.        Cursor motions
  544.  
  545.        If the terminal has a fast way to home the cursor (to very
  546.        upper left corner of screen) then this  can  be    given  as
  547.        home;  similarly    a  fast way of getting to the lower left
  548.        hand corner can be given as ll; this may involve going  up
  549.        with  cuu1  from    the  home position, but a program should
  550.        never do this itself (unless ll does) because it can  make
  551.        no  assumption about the effect of moving up from the home
  552.        position.  Note that the home  position    is  the    same  as
  553.        addressing to (0,0): to the top left corner of the screen,
  554.        not of memory.  (Thus, the \EH sequence    on  HP    terminals
  555.        cannot be used for home.)
  556.  
  557.        Area clears
  558.  
  559.        If the terminal can clear from the current position to the
  560.        end of the line, leaving the  cursor  where  it    is,  this
  561.        should be given as el.  If the terminal can clear from the
  562.        current position to the end  of    the  display,  then  this
  563.        should  be given as ed.    ed is only defined from the first
  564.        column of a line.  (Thus, it can be simulated by a request
  565.        to  delete  a  large  number of lines, if a true ed is not
  566.        available.)
  567.  
  568.        Insert/delete line
  569.  
  570.        If the terminal can open a new blank line before the  line
  571.        where  the cursor is, this should be given as il1; this is
  572.        done only from the first position of a line.   The  cursor
  573.        must then appear on the newly blank line.  If the terminal
  574.        can delete the line which the  cursor  is  on,  then  this
  575.        should  be  given as dl1; this is done only from the first
  576.        position on the line to be deleted.  Versions of    il1  and
  577.        dl1  which  take    a  single parameter and insert or delete
  578.        that many lines can be given as il and dl.  If the  termi-
  579.        nal  has    a settable scrolling region (like the vt100) the
  580.        command to set this can be described with the csr capabil-
  581.        ity,  which takes two parameters: the top and bottom lines
  582.        of the scrolling region.    The cursor  position  is,  alas,
  583.        undefined after using this command.  It is possible to get
  584.        the effect of insert or delete line using this  command    -
  585.        the  sc and rc (save and restore cursor) commands are also
  586.        useful.    Inserting lines at  the    top  or  bottom  of  the
  587.        screen  can also be done using ri or ind on many terminals
  588.        without true insert/delete line, and are often faster even
  589.        on terminals with those features.
  590.  
  591.        If the terminal has the ability to define a window as part
  592.        of memory, which all commands affect, it should    be  given
  593.        as the parameterized string wind.  The four parameters are
  594.        the starting and ending lines in memory and  the    starting
  595.        and ending columns in memory, in that order.
  596.  
  597.        If  the    terminal can retain display memory above then the
  598.        da capability should be given; if display  memory  can  be
  599.        retained    below    then  db should be given.  These indicate
  600.        that deleting a line  or    scrolling  may    bring    non-blank
  601.        lines  up  from    below  or that scrolling back with ri may
  602.        bring down non-blank lines.
  603.  
  604.        Insert/delete character
  605.  
  606.        There are two basic kinds of  intelligent  terminals  with
  607.        respect    to insert/delete character which can be described
  608.        using terminfo.    The most common    insert/delete    character
  609.        operations  affect only the characters on the current line
  610.        and shift characters off the  end  of  the  line    rigidly.
  611.        Other  terminals,  such    as the Concept 100 and the Perkin
  612.        Elmer Owl, make a distinction between  typed  and  untyped
  613.        blanks  on  the    screen, shifting upon an insert or delete
  614.        only to an untyped blank on the    screen    which  is  either
  615.        eliminated,  or    expanded  to two untyped blanks.  You can
  616.        find out which kind of terminal you have by  clearing  the
  617.        screen  and  then typing text separated by cursor motions.
  618.        Type abc    def using local cursor  motions  (not  spaces)
  619.        between    the  abc  and  the def.    Then position the cursor
  620.        before the abc and put the terminal in  insert  mode.   If
  621.        typing  characters  causes  the    rest of the line to shift
  622.        rigidly and characters to fall off the end, then your ter-
  623.        minal  does  not    distinguish  between  blanks and untyped
  624.        positions.  If the abc shifts over to the def  which  then
  625.        move  together around the end of the current line and onto
  626.        the next as you insert, you have the second type of termi-
  627.        nal,  and  should give the capability in, which stands for
  628.        insert null.   While  these  are    two  logically    separate
  629.        attributes  (one line vs. multi line insert mode, and spe-
  630.        cial treatment of untyped spaces) we have seen  no  termi-
  631.        nals whose insert mode cannot be described with the single
  632.        attribute.
  633.  
  634.        Termcap can describe both terminals which have  an  insert
  635.        mode, and terminals which send a simple sequence to open a
  636.        blank position on the current  line.   Give  as    smir  the
  637.        sequence    to  get  into    insert    mode.    Give  as rmir the
  638.        sequence to leave insert    mode.    Now  give  as    ich1  any
  639.        sequence    needed    to  be    sent  just  before  sending  the
  640.        character to be inserted.   Most    terminals  with  a  true
  641.        insert  mode  will  not    give ich1, terminals which send a
  642.        sequence to open a screen position should  give    it  here.
  643.        (Insert mode is usually preferable to the sequence to open
  644.        a position on the screen if your terminal has  both.)   If
  645.        post  insert  padding  is needed, give this as a number of
  646.        milliseconds in ip (a string option).  Any other    sequence
  647.        which  may  need    to  be    sent after an insert of a single
  648.        character may also be given in ip.  If your terminal needs
  649.        both to be placed into an `insert mode' and a special code
  650.        to precede each inserted character,  then  both    smir/rmir
  651.        and  ich1  can  be  given, and both will be used.  The ich
  652.        capability, with one parameter, n, will repeat the effects
  653.        of ich1 n times.
  654.  
  655.        It  is  occasionally  necessary    to  move  around while in
  656.        insert mode to delete characters on the same line (e.g. if
  657.        there  is  a  tab  after the insertion position).  If your
  658.        terminal allows motion while in insert mode you    can  give
  659.        the  capability    mir  to    speed up inserting in this case.
  660.        Omitting mir will  affect  only    speed.    Some    terminals
  661.        (notably Datamedia's) must not have mir because of the way
  662.        their insert mode works.
  663.  
  664.        Finally, you can specify dch1 to delete a  single  charac-
  665.        ter,  dch  with    one parameter, n, to delete n characters,
  666.        and delete mode by giving smdc and rmdc to enter and  exit
  667.        delete  mode  (any mode the terminal needs to be placed in
  668.        for dch1 to work).
  669.  
  670.        A command to erase n characters (equivalent to  outputting
  671.        n  blanks  without  moving the cursor) can be given as ech
  672.        with one parameter.
  673.  
  674.        Highlighting, underlining, and visible bells
  675.  
  676.        If  your    terminal  has    one  or    more  kinds  of  display
  677.        attributes,  these  can be represented in a number of dif-
  678.        ferent ways.  You should choose one display form as stand-
  679.        out mode , representing a good, high contrast, easy on the
  680.        eyes, format for highlighting  error  messages  and  other
  681.        attention  getters.   (If you have a choice, reverse video
  682.        plus half bright is good, or reverse  video  alone.)   The
  683.        sequences  to  enter  and  exit standout mode are given as
  684.        smso and rmso respectively.  If the code to change into or
  685.        out  of    standout mode leaves one or even two blank spaces
  686.        on the screen, as the TVI 912 and Teleray  1061    do,  then
  687.        xmc should be given to tell how many spaces are left.
  688.  
  689.        Codes  to  begin    underlining  and  end underlining can be
  690.        given as smul and rmul respectively.  If the terminal  has
  691.        a  code    to  underline  the current character and move the
  692.        cursor one space to the right, such as the Microterm Mime,
  693.        this can be given as uc.
  694.  
  695.        Other  capabilities  to    enter  various highlighting modes
  696.        include blink (blinking) bold (bold or extra  bright)  dim
  697.        (dim  or    half  bright) invis (blanking or invisible text)
  698.        prot (protected) rev (reverse video) sgr0  (turn    off  all
  699.        attribute  modes)  smacs    (enter    alternate  character set
  700.        mode) and  rmacs    (exit    alternate  character  set  mode).
  701.        Turning    on  any of these modes singly may or may not turn
  702.        off other modes.
  703.  
  704.        If there is a sequence to set  arbitrary    combinations  of
  705.        modes,  this should be given as sgr (set attributes), tak-
  706.        ing 9 parameters.  Each parameter is either 0 or 1, as the
  707.        corresponding  attribute    is  on or off.    The 9 parameters
  708.        are, in order: standout, underline, reverse,  blink,  dim,
  709.        bold,  invis,  protect,    alternate character set.  Not all
  710.        modes need be supported by sgr, only those for which  cor-
  711.        responding separate attribute commands exist.
  712.  
  713.        Terminals  with    the ``magic cookie'' glitch (xmc) deposit
  714.        special    ``cookies''  when  they    receive   mode    setting
  715.        sequences, which affect the display algorithm, rather than
  716.        having extra bits for  each  character.    Some  terminals,
  717.        such  as    the  HP  2621, automatically leave standout mode
  718.        when they move to a new line or the cursor  is  addressed.
  719.        Programs    using    standout  mode    should exit standout mode
  720.        before moving the cursor or sending a newline, unless  the
  721.        msgr  capability,  asserting  that  it  is safe to move in
  722.        standout mode, is present.
  723.  
  724.        If the terminal has a way of flashing the screen to  indi-
  725.        cate  an    error quietly (a bell replacement) then this can
  726.        be given as flash; it must not move the cursor.
  727.  
  728.        If the cursor needs to be made more  visible  than  normal
  729.        when it is not on the bottom line (to make, for example, a
  730.        non-blinking underline into an easier  to  find    block  or
  731.        blinking underline) give this sequence as cvvis.    If there
  732.        is a way to make the  cursor  completely    invisible,  give
  733.        that as civis.  The capability cnorm should be given which
  734.        undoes the effects of both of these modes.
  735.  
  736.        If the terminal needs to be in a special mode when running
  737.        a  program that uses these capbilities, the codes to enter
  738.        and exit this mode can be given as smcup and rmcup.   This
  739.        arises,    for example, from terminals like the Concept with
  740.        more than one page of memory.  If the  terminal    has  only
  741.        memory  relative cursor addressing and not screen relative
  742.        cursor addressing, a one screen-sized window must be fixed
  743.        into  the terminal for cursor addressing to work properly.
  744.        This is also used for the Tektronix 4025, where smcup sets
  745.        the command character to be the one used by terminfo.
  746.  
  747.        If your terminal correctly generates underlined characters
  748.        (with no special codes needed) even  though  it    does  not
  749.        overstrike,  then  you  should give the capability ul.  If
  750.        overstrikes are erasable with a blank, then this should be
  751.        indicated by giving eo.
  752.  
  753.        Keypad
  754.  
  755.        If the terminal has a keypad that transmits codes when the
  756.        keys are pressed, this information can be given. Note that
  757.        it  is  not  possible to handle terminals where the keypad
  758.        only works in local (this applies,  for    example,  to  the
  759.        unshifted  HP  2621  keys).   If    the keypad can be set to
  760.        transmit or not transmit, give these  codes  as    smkx  and
  761.        rmkx.  Otherwise the keypad is assumed to always transmit.
  762.        The codes sent by the left arrow, right arrow,  up  arrow,
  763.        down  arrow,  and  home keys can be given as kcub1, kcuf1,
  764.        kcuu1, kcud1, and khome respectively.  If there are  func-
  765.        tion  keys  such    as f0, f1, ..., f10, the codes they send
  766.        can be given as kf0, kf1, ..., kf10.  If these  keys  have
  767.        labels  other  than the default f0 through f10, the labels
  768.        can be given as lf0, lf1, ..., lf10.  The codes    transmit-
  769.        ted  by    certain    other    special    keys  can  be given: kbs
  770.        (backspace), ktbc (clear all tabs), kctab (clear    the  tab
  771.        stop  in    this  column), kclr (clear screen or erase key),
  772.        kdch1 (delete character), kdl1 (delete line), krmir  (exit
  773.        insert  mode),  kel  (clear to end of line), ked (clear to
  774.        end of screen), kich1 (insert character    or  enter  insert
  775.        mode),  kil1 (insert line), knp (next page), kpp (previous
  776.        page),  kind  (scroll  forward/down),  kri  (scroll  back-
  777.        ward/up), khts (set a tab stop in this column).
  778.  
  779.        Tabs and Initialization
  780.  
  781.        If  the terminal has hardware tabs, the command to advance
  782.        to the next tab stop can be given as ht    (usually  control
  783.        I).   A    ``backtab''  command  which moves leftward to the
  784.        next tab stop can be given as cbt.  By convention, if  the
  785.        teletype    modes    indicate  that tabs are being expanded by
  786.        the computer rather than being sent to the terminal,  pro-
  787.        grams  should  not use ht or cbt even if they are present,
  788.        since the user may not have the tab  stops  properly  set.
  789.        If  the terminal has hardware tabs activated by control I,
  790.        then tabs is given, in addition to ht.  This  is    normally
  791.        used  by    the  tset(1) command to determine whether to set
  792.        the mode for hardware tab expansion.
  793.  
  794.        Other capabilities include is1, is2, and is3,  initializa-
  795.        tion  strings for the terminal, and if, the name of a file
  796.        containing long initialization strings.    These strings are
  797.        expected    to  set  the terminal into modes consistent with
  798.        the rest of the terminfo description.  They  are    normally
  799.        sent  to    the  terminal, by the tset(1) program, each time
  800.        the user logs in.  They will be printed in  the    following
  801.        order:  is1;  is2; setting tabs using tbc and hts; if; and
  802.        finally is3.  Most  initialization  is  done  with  is2    .
  803.  
  804.        Special    terminal  modes can be set up without duplicating
  805.        strings by putting the common sequences in is2 and special
  806.        cases  in  is1  and  is3.  A pair of sequences that does a
  807.        harder reset from a totally unknown state  can  be  analo-
  808.        gously  given  as  rs1, rs2, rf, and rs3, analogous to is2
  809.        and if.    These strings are output by the reset(1) program,
  810.        which  is used when the terminal gets into a wedged state.
  811.        Commands are normally placed in rs2 and rf  only    if  they
  812.        produce    annoying effects on the screen and are not neces-
  813.        sary when logging in.  For example, the command to set the
  814.        vt100  into  80 column mode would normally be part of is2,
  815.        but it causes an annoying glitch of the screen and is  not
  816.        normally    needed    since the terminal is usually already in
  817.        80 column mode.
  818.  
  819.        If there are commands to set and clear tab stops, they can
  820.        be  given  as tbc (clear all tab stops) and hts (set a tab
  821.        stop in the current column of every row).  If a more  com-
  822.        plex  sequence  is  needed  to  set  the    tabs than can be
  823.        described by this, the sequence can be placed  in  is2  or
  824.        if.
  825.  
  826.        Delays
  827.  
  828.        Certain    capabilities  control  padding    in  the    teletype
  829.        driver.    These are primarily needed by  hard  copy  termi-
  830.        nals,  and are used by the tset(1) program to set teletype
  831.        modes appropriately.  Delays embedded in the  capabilities
  832.        cr  , ind , cub1 , ff , and tab will cause the appropriate
  833.        delay bits to be    set  in  the  teletype    driver.   If  pb
  834.        (padding    baud rate) is given, these values can be ignored
  835.        at baud rates below the value of pb .
  836.  
  837.        Miscellaneous
  838.  
  839.        If the terminal requires other than a null (zero)  charac-
  840.        ter  as    a  pad,    then this can be given as pad.    Only the
  841.        first character of the pad string is used.
  842.  
  843.        If the terminal has an extra ``status line'' that  is  not
  844.        normally used by software, this fact can be indicated.  If
  845.        the status line is viewed as an extra line below the  bot-
  846.        tom  line,  into    which    one  can cursor address normally,
  847.        (such as the Heathkit h19's 25th line, or the 24th line of
  848.        a  vt100    which    is set to a 23 line scrolling region) the
  849.        capability hs should be given.  Special strings to  go  to
  850.        the  beginning  of  the status line and to return from the
  851.        status line can be given as tsl and fsl.    (fsl must  leave
  852.        the  cursor position in the same place it was before tsl.)
  853.        tsl takes one parameter, which is the column number of the
  854.        status  line  the  cursor  is  to  be moved to.    If escape
  855.        sequences and other special commands, such  as  tab,  work
  856.        while  in the status line, the flag eslok can be given.    A
  857.        string which turns  off    the  status  line  (or    otherwise
  858.        erases its contents) should be given as dsl .  If the ter-
  859.        minal has commands to save and restore the position of the
  860.        cursor,    give  them as sc and rc.  The status line is nor-
  861.        mally assumed to be the same width  as  the  rest  of  the
  862.        screen,    e.g.   cols  .    If the status line is a different
  863.        width (possibly because the terminal  does  not    allow  an
  864.        entire  line  to    be loaded) the width, in columns, can be
  865.        indicated with the numeric parameter wsl .
  866.  
  867.        If the terminal can move up or down half a line, this  can
  868.        be  indicated  with  hu    (half  line up) and hd (half line
  869.        down).  This is primarily useful for superscripts and sub-
  870.        scripts on hardcopy terminals.  If a hardcopy terminal can
  871.        eject to the next page (form feed), give this as ff  (usu-
  872.        ally control L).
  873.  
  874.        If  there is a command to repeat a given character a given
  875.        number of times (to save time transmitting a large  number
  876.        of  identical  characters)  this can be indicated with the
  877.        parameterized string rep.   The    first  parameter  is  the
  878.        character  to  be repeated and the second is the number of
  879.        times to repeat it.  Thus, tparm(repeat_char, 'x', 10)  is
  880.        the same as `xxxxxxxxxx'.
  881.  
  882.        If  the terminal has a settable command character, such as
  883.        the Tektronix 4025, this can be indicated with CC.  A pro-
  884.        totype  command    character  is chosen which is used in all
  885.        capabilities.  This character is given in the CC    capabil-
  886.        ity to identify it.  The following convention is supported
  887.        on some UNIX systems: The environment is    to  be    searched
  888.        for  a  CC  variable, and if found, all occurrances of the
  889.        prototype character are replaced with the character in the
  890.        environment variable.
  891.  
  892.        Terminal    descriptions  that  do    not represent a specific
  893.        kind of known terminal, such as switch, dialup, patch, and
  894.        network,    should    include  the  gn (generic) capability so
  895.        that programs can complain that they  don't  know  how  to
  896.        talk  to the terminal.  (This capability does not apply to
  897.        virtual    terminal  descriptions    for  which   the   escape
  898.        sequences are known.)
  899.  
  900.        If  the    terminal  uses xon/xoff handshaking for flow con-
  901.        trol, give  xon.    Padding  information    should    still  be
  902.        included    so that routines can make better decisions about
  903.        costs, but actual pad characters may not be transmitted.
  904.  
  905.        If the terminal has a ``meta key'' which acts as    a  shift
  906.        key,  setting  the  8th    bit of any character transmitted,
  907.        this fact can be indicated with km.   Otherwise,    software
  908.        will assume that the 8th bit is parity and it will usually
  909.        be cleared.  If strings exist to turn this  ``meta  mode''
  910.        on and off, they can be given as smm and rmm.
  911.  
  912.        If  the terminal has more lines of memory than will fit on
  913.        the screen at once, the number of lines of memory  can  be
  914.        indicated with lm.  A value of 0 indicates that the number
  915.        of lines is not fixed, but that there is still more memory
  916.        than fits on the screen.
  917.  
  918.        If  the    terminal is one of those supported by the CB-UNIX
  919.        virtual terminal protocol,  the    terminal  number  can  be
  920.        given as vt.
  921.  
  922.        Media copy strings which control an auxillary printer con-
  923.        nected to the terminal can be given as mc0: print the con-
  924.        tents  of  the  screen, mc4: turn on the printer, and mc5:
  925.        turn off the printer.  When the printer is  on,    all  text
  926.        sent  to    the terminal will be sent to the printer.  It is
  927.        undefined whether the text is also displayed on the termi-
  928.        nal screen when the printer is on.
  929.  
  930.        Strings    to  program  function keys can be given as pfkey,
  931.        pfloc, and pfx.    Each of these strings takes  two  parame-
  932.        ters:  the  function  key number to program (from 0 to 10)
  933.        and the string to program it with.  Function  key  numbers
  934.        out of this range may program undefined keys in a terminal
  935.        dependent manner.  The difference between the capabilities
  936.        is that pfkey causes pressing the given key to be the same
  937.        as the user typing the  given  string,  pfloc  causes  the
  938.        string  to  be  executed by the terminal in local, and pfx
  939.        causes the string to be transmitted to the computer.
  940.  
  941.        Glitches and Braindamage
  942.  
  943.        Hazeltine terminals, which don't allow `~'  characters  to
  944.        be displayed should indicate hz.
  945.  
  946.        Terminals  which ignore a linefeed immediately after an am
  947.        wrap, such as the Concept and vt100, should indicate xenl.
  948.  
  949.        If  el  is  required  to    get  rid of standout (instead of
  950.        merely writing normal text on top of it),  xhp  should  be
  951.        given.
  952.  
  953.        Teleray    terminals,  where  tabs turn all characters moved
  954.        over to blanks, should  indicate    xt  (destructive  tabs).
  955.        This  glitch is also taken to mean that it is not possible
  956.        to position the cursor on top of a ``magic cookie'',  that
  957.        to  erase  standout  mode  it  is instead necessary to use
  958.        delete and insert line.
  959.  
  960.        The Beehive Superbee, which is unable to correctly  trans-
  961.        mit  the escape or control C characters, has xsb, indicat-
  962.        ing that the f1 key is used for escape and f2 for  control
  963.        C.   (Only  certain superbees have this problem, depending
  964.        on the ROM.)
  965.  
  966.        Other specific  terminal    problems  may    be  corrected  by
  967.        adding more capabilities of the form xx.
  968.  
  969.        Similar Terminals
  970.  
  971.        If  there  are  two  very  similar  terminals,  one can be
  972.        defined as being just like the other with  certain  excep-
  973.        tions.    The  string  capability use can be given with the
  974.        name of the  similar  terminal.    The  capabilities  given
  975.        before  use override those in the terminal type invoked by
  976.        use.  A capability can be cancelled with xx@ where  xx  is
  977.        the capability.    For example, the entry
  978.  
  979.         2621-nl, smkx@, rmkx@, use=2621,
  980.  
  981.        defines    a  2621-nl  that  does    not have the smkx or rmkx
  982.        capabilities, and hence does not turn on the function  key
  983.        labels  when in visual mode.  This is useful for different
  984.        modes for a terminal, or for different  user  preferences.
  985.        An  terminal may have as many use entries as needed.  They
  986.        are handled in the order given in  the  description,  that
  987.        is,  later  use's  will not overwrite capabilities defined
  988.        earlier in the entry.
  989.  
  990. FILES
  991.        /usr/lib/terminfo  file containing terminal descriptions
  992.        /usr/lib/terminfo/?/*  directories  containing  compiled    descrip-
  993.        tions
  994.  
  995. SEE ALSO
  996.        ex(1), curses(3), tset(1), vi(1), ul(1), more(1)
  997.  
  998. AUTHOR
  999.        Pavel Curtis
  1000.        Zeyd M. Ben-Halim
  1001.  
  1002.